home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / SocketServices.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  24.6 KB  |  823 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SocketServices.a
  3. ;
  4. ;    Contains:    This file contains constants and data structures that
  5. ;                describe the Socket Service interface to Card Services.
  6. ;
  7. ;     Version:    Technology: PCMCIA Software 2.0
  8. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  9. ;
  10. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  11. ;                All rights reserved.
  12. ;
  13. ;     Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  14. ;                 stack.  Include the file and version information (from above)
  15. ;                 in the problem description and send to:
  16. ;                     Internet:    apple.bugs@applelink.apple.com
  17. ;                     AppleLink:    APPLE.BUGS
  18. ;
  19.  
  20.     IF &TYPE('__SOCKETSERVICES__') = 'UNDEFINED' THEN
  21. __SOCKETSERVICES__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  30.     include 'MixedMode.a'
  31.     ENDIF
  32. ; typedef Byte                 SS_BYTE
  33. ; typedef Byte                 SS_FLAGS8
  34. ; typedef Byte                 SS_IRQ
  35. ; typedef Byte                 SS_PWRLEVEL
  36. ; typedef UInt16             SS_ADAPTER
  37. ; typedef UInt16             SS_BCD
  38. ; typedef UInt16             SS_COUNT
  39. ; typedef UInt16             SS_EDC
  40. ; typedef UInt16             SS_FLAGS16
  41. ; typedef UInt16             SS_PAGE
  42. ; typedef UInt16             SS_PWRINDEX
  43. ; typedef UInt16             SS_SIGNATURE
  44. ; typedef UInt16             SS_SKTBITS
  45. ; typedef UInt16             SS_SOCKET
  46. ; typedef UInt16             SS_SPEED
  47. ; typedef UInt16             SS_WINDOW
  48. ; typedef UInt16             SS_WORD
  49. ; typedef UInt32             SS_BASE
  50. ; typedef UInt32             SS_FLAGS32
  51. ; typedef UInt32             SS_OFFSET
  52. ; typedef UInt32             SS_SIZE
  53. ; typedef Ptr                 SS_PTR
  54. ; typedef OSErr             SS_RETCODE
  55. ; typedef struct SS_SCHARTBL  SS_SCHARTBL
  56. SS_SCHARTBL             RECORD    0
  57. sktCaps                     ds.w   1        ; offset: $0 (0)        ;    SS_FLAGS16
  58. activeHigh                 ds.l   1        ; offset: $2 (2)        ;    SS_FLAGS32
  59. activeLow                 ds.l   1        ; offset: $6 (6)        ;    SS_FLAGS32
  60. sizeof                     EQU *            ; size:   $A (10)
  61.                         ENDR
  62.  
  63. ; typedef struct SS_SISTRUCT  SS_SISTRUCT
  64. SS_SISTRUCT             RECORD    0
  65. bufferLength             ds.w   1        ; offset: $0 (0)        ;    SS_WORD
  66. dataLength                 ds.w   1        ; offset: $2 (2)        ;    SS_WORD
  67. charTable                 ds     SS_SCHARTBL ; offset: $4 (4)    ;    SS_FLAGS16
  68. sizeof                     EQU *            ; size:   $E (14)
  69.                         ENDR
  70.  
  71.     STR_SIZE: SET 24
  72. ; typedef struct SS_VISTRUCT  SS_VISTRUCT
  73. SS_VISTRUCT             RECORD    0
  74. bufferLength             ds.w   1        ; offset: $0 (0)        ;    SS_WORD
  75. dataLength                 ds.w   1        ; offset: $2 (2)        ;    SS_WORD
  76. szImplementor             ds.b   1        ; offset: $4 (4)        ;    SS_WORD
  77. padding                     ds.b   1        ; offset: $5 (5)        ;    
  78. sizeof                     EQU *            ; size:   $6 (6)
  79.                         ENDR
  80.  
  81. ; typedef struct SS_ACHARTBL  SS_ACHARTBL
  82. SS_ACHARTBL             RECORD    0
  83. adpCaps                     ds.w   1        ; offset: $0 (0)        ;    SS_FLAGS16
  84. activeHigh                 ds.l   1        ; offset: $2 (2)        ;    SS_FLAGS32
  85. activeLow                 ds.l   1        ; offset: $6 (6)        ;    SS_FLAGS32
  86. sizeof                     EQU *            ; size:   $A (10)
  87.                         ENDR
  88.  
  89. ; typedef struct SS_PWRENTRY  SS_PWRENTRY
  90. SS_PWRENTRY             RECORD    0
  91. powerLevel                 ds.b   1        ; offset: $0 (0)        ;    SS_PWRLEVEL
  92. validSignals             ds.b   1        ; offset: $1 (1)        ;    SS_FLAGS8
  93. sizeof                     EQU *            ; size:   $2 (2)
  94.                         ENDR
  95.  
  96. ; typedef struct SS_AISTRUCT  SS_AISTRUCT
  97. SS_AISTRUCT             RECORD    0
  98. bufferLength             ds.w   1        ; offset: $0 (0)        ;    SS_WORD
  99. dataLength                 ds.w   1        ; offset: $2 (2)        ;    SS_WORD
  100. charTable                 ds     SS_ACHARTBL ; offset: $4 (4)
  101. numPwrEntries             ds.w   1        ; offset: $E (14)        ;    SS_WORD
  102. pwrEntryPtr                 ds.l   1        ; offset: $10 (16)
  103. sizeof                     EQU *            ; size:   $14 (20)
  104.                         ENDR
  105.  
  106. ; typedef struct SS_MEMWINTBL  SS_MEMWINTBL
  107. SS_MEMWINTBL             RECORD    0
  108. memWndCaps                 ds.w   1        ; offset: $0 (0)        ;    SS_FLAGS16
  109. firstByte                 ds.l   1        ; offset: $2 (2)        ;    SS_BASE
  110. lastByte                 ds.l   1        ; offset: $6 (6)        ;    SS_BASE
  111. minSize                     ds.l   1        ; offset: $A (10)        ;    SS_SIZE
  112. maxSize                     ds.l   1        ; offset: $E (14)        ;    SS_SIZE
  113. reqGran                     ds.l   1        ; offset: $12 (18)        ;    SS_SIZE
  114. reqBase                     ds.l   1        ; offset: $16 (22)        ;    SS_SIZE
  115. reqOffset                 ds.l   1        ; offset: $1A (26)        ;    SS_SIZE
  116. slowest                     ds.w   1        ; offset: $1E (30)        ;    SS_SPEED
  117. fastest                     ds.w   1        ; offset: $20 (32)        ;    SS_SPEED
  118. sizeof                     EQU *            ; size:   $22 (34)
  119.                         ENDR
  120.  
  121. ; typedef struct SS_IOWINTBL  SS_IOWINTBL
  122. SS_IOWINTBL             RECORD    0
  123. ioWndCaps                 ds.w   1        ; offset: $0 (0)        ;    SS_FLAGS16
  124. firstByte                 ds.l   1        ; offset: $2 (2)        ;    SS_BASE
  125. lastByte                 ds.l   1        ; offset: $6 (6)        ;    SS_BASE
  126. minSize                     ds.l   1        ; offset: $A (10)        ;    SS_SIZE
  127. maxSize                     ds.l   1        ; offset: $E (14)        ;    SS_SIZE
  128. reqGran                     ds.l   1        ; offset: $12 (18)        ;    SS_SIZE
  129. addrLines                 ds.w   1        ; offset: $16 (22)        ;    SS_COUNT
  130. eisaSlot                 ds.b   1        ; offset: $18 (24)        ;    SS_FLAGS8
  131. padding                     ds.b   1        ; offset: $19 (25)        ;    
  132. sizeof                     EQU *            ; size:   $1A (26)
  133.                         ENDR
  134.  
  135. ; typedef struct SS_WISTRUCT  SS_WISTRUCT
  136. SS_WISTRUCT             RECORD    0
  137. bufferLength             ds.w   1        ; offset: $0 (0)        ;    SS_WORD
  138. dataLength                 ds.w   1        ; offset: $2 (2)        ;    SS_WORD
  139. numTblEntries             ds.w   1        ; offset: $4 (4)        ;    SS_WORD
  140. memWinTbl                 ds     SS_MEMWINTBL ; offset: $6 (6)
  141. ioWinTbl                 ds     SS_IOWINTBL ; offset: $28 (40)
  142. sizeof                     EQU *            ; size:   $42 (66)
  143.                         ENDR
  144.  
  145. ;————————————————————————————————————————————————————————————————————————
  146. ;    function selectors passed to Socket Service entry point
  147. ;————————————————————————————————————————————————————————————————————————
  148.  
  149. fnSSGetAdapterCount                EQU        $80
  150. fnSSUnsupported81                EQU        $81
  151. fnSSUnsupported82                EQU        $82
  152. fnSSGetSSInfo                    EQU        $83
  153. fnSSInquireAdapter                EQU        $84
  154. fnSSGetAdapter                    EQU        $85
  155. fnSSSetAdapter                    EQU        $86
  156. fnSSInquireWindow                EQU        $87
  157. fnSSGetWindow                    EQU        $88
  158. fnSSSetWindow                    EQU        $89
  159. fnSSGetPage                        EQU        $8A
  160. fnSSSetPage                        EQU        $8B
  161. fnSSInquireSocket                EQU        $8C
  162. fnSSGetSocket                    EQU        $8D
  163. fnSSSetSocket                    EQU        $8E
  164. fnSSGetStatus                    EQU        $8F
  165. fnSSResetSocket                    EQU        $90
  166. fnSSUnsupported91                EQU        $91
  167. fnSSUnsupported92                EQU        $92
  168. fnSSUnsupported93                EQU        $93
  169. fnSSUnsupported94                EQU        $94
  170. fnSSInquireEDC                    EQU        $95
  171. fnSSGetEDC                        EQU        $96
  172. fnSSSetEDC                        EQU        $97
  173. fnSSStartEDC                    EQU        $98
  174. fnSSPauseEDC                    EQU        $99
  175. fnSSResumeEDC                    EQU        $9A
  176. fnSSStopEDC                        EQU        $9B
  177. fnSSReadEDC                        EQU        $9C
  178. fnSSGetVendorInfo                EQU        $9D
  179. fnSSAcknowledgeInterrupt        EQU        $9E
  180. fnSSGetSetPriorHandler            EQU        $9F
  181. fnSSGetSetSSAddr                EQU        $A0
  182. fnSSGetAccessOffsets            EQU        $A1
  183. fnSSUnsupportedA2                EQU        $A2
  184. fnSSUnsupportedA3                EQU        $A3
  185. fnSSUnsupportedA4                EQU        $A4
  186. fnSSUnsupportedA5                EQU        $A5
  187. fnSSUnsupportedA6                EQU        $A6
  188. fnSSUnsupportedA7                EQU        $A7
  189. fnSSUnsupportedA8                EQU        $A8
  190. fnSSUnsupportedA9                EQU        $A9
  191. fnSSUnsupportedAA                EQU        $AA
  192. fnSSUnsupportedAB                EQU        $AB
  193. fnSSUnsupportedAC                EQU        $AC
  194. fnSSUnsupportedAD                EQU        $AD
  195. fnSSVendorSpecific                EQU        $AE
  196.  
  197. ;    SSVendorSpecificPB.function values
  198. fnVSReserved                    EQU        $00
  199. fnVSGetSocketLocationIcon        EQU        $01
  200. fnVSGetSocketLocationText        EQU        $02
  201. fnVSDoSocketLocalization        EQU        $03
  202. fnVSAppleSocketCapabilities        EQU        $04
  203. fnVSSleepWakeNotification        EQU        $05
  204.  
  205. ;————————————————————————————————————————————————————————————————————————
  206. ;    defines for the Socket Services function codes
  207. ;————————————————————————————————————————————————————————————————————————
  208. AC_IND                            EQU        1                    ; adapter characteristics
  209. AC_PWR                            EQU        2
  210. AC_DBW                            EQU        4
  211.  
  212. AS_POWERDOWN                    EQU        1
  213. AS_MAINTAIN                        EQU        2
  214.  
  215. EC_UNI                            EQU        1
  216. EC_BI                            EQU        2
  217. EC_REGISTER                        EQU        4
  218. EC_MEMORY                        EQU        8
  219. EC_PAUSABLE                        EQU        16
  220. EC_WRITE                        EQU        16
  221.  
  222. ET_CHECK8                        EQU        1
  223. ET_SDLC16                        EQU        2
  224.  
  225. IF_MEMORY                        EQU        1
  226. IF_IO                            EQU        2
  227.  
  228. IRQ_HIGH                        EQU        64
  229. IRQ_ENABLE                        EQU        128
  230.  
  231. IRQ_MEMORY                        EQU        4
  232. IRQ_IO                            EQU        4
  233.  
  234. PS_ATTRIBUTE                    EQU        $01
  235. PS_ENABLED                        EQU        $02
  236. PS_WP                            EQU        $04
  237.  
  238. PWR_VCC                            EQU        128                    ; Power pins in PwrEntry elements
  239. PWR_VPP1                        EQU        64
  240. PWR_VPP2                        EQU        32
  241.  
  242. SBM_WP                            EQU        1
  243. SBM_LOCKED                        EQU        2
  244. SBM_EJECT                        EQU        4
  245. SBM_INSERT                        EQU        8
  246. SBM_BVD1                        EQU        16
  247. SBM_BVD2                        EQU        32
  248. SBM_RDYBSY                        EQU        64
  249. SBM_CD                            EQU        128
  250.  
  251. SBM_LOCK                        EQU        16
  252. SBM_BATT                        EQU        32
  253. SBM_BUSY                        EQU        64
  254. SBM_XIP                            EQU        128
  255.  
  256. ; Vendor Specific Apple Socket Capabilities 
  257. SBM_SLEEP_PWR                    EQU        1
  258.  
  259. WC_COMMON                        EQU        1
  260. WC_IO                            EQU        2
  261. WC_ATTRIBUTE                    EQU        4
  262. WC_TYPE_MASK                    EQU        7
  263. WC_WAIT                            EQU        128
  264.  
  265. WC_BASE                            EQU        1
  266. WC_SIZE                            EQU        2
  267. WC_WENABLE                        EQU        4
  268. WC_8BIT                            EQU        8
  269. WC_16BIT                        EQU        16
  270. WC_BALIGN                        EQU        32
  271. WC_POW2                            EQU        64
  272. WC_CALIGN                        EQU        128
  273. WC_PAVAIL                        EQU        256
  274. WC_PSHARED                        EQU        512
  275. WC_PENABLE                        EQU        1024
  276. WC_WP                            EQU        2048
  277.  
  278. WC_INPACK                        EQU        128
  279. WC_EISA                            EQU        256
  280. WC_CENABLE                        EQU        512
  281.  
  282. WS_IO                            EQU        1
  283. WS_ENABLED                        EQU        2
  284. WS_16BIT                        EQU        4
  285.  
  286. WS_PAGED                        EQU        8
  287. WS_EISA                            EQU        16
  288. WS_CENABLE                        EQU        32
  289. WS_SWAP_LITTLE_TO_BIG_ENDIAN    EQU        64
  290.  
  291. SS_SIG_VALUE                    EQU        $5353                ; 'SS'
  292.  
  293. SS_CMPL_1_00                    EQU        $0100                ; compliant with rev 1.0 of SS standard
  294. SS_CMPL_1_01                    EQU        $0101                ; compliant with rev 1.01 of SS standard
  295. SS_CMPL_2_00                    EQU        $0200                ; compliant with rev 2.0 of SS standard
  296. SS_CMPL_2_10                    EQU        $0210                ; compliant with rev 2.1 of SS standard
  297.  
  298. ;————————————————————————————————————————————————————————————————————————
  299. ;    Universal ProcPtr for Socket Service entry point
  300. ;————————————————————————————————————————————————————————————————————————
  301. ;————————————————————————————————————————————————————————————————————————
  302. ;    Card Services calls used by a Socket Service
  303. ;————————————————————————————————————————————————————————————————————————
  304. ; typedef struct CSEventEntryPB  CSEventEntryPB
  305. CSEventEntryPB             RECORD    0
  306. ssHandlerID                 ds.l   1        ; offset: $0 (0)
  307. adapter                     ds.w   1        ; offset: $4 (4)
  308. socket                     ds.w   1        ; offset: $6 (6)
  309. message                     ds.w   1        ; offset: $8 (8)
  310. intrpBits                 ds.b   1        ; offset: $A (10)
  311. padding                     ds.b   1        ; offset: $B (11)
  312. sizeof                     EQU *            ; size:   $C (12)
  313.                         ENDR
  314.  
  315. ;------------        AddSocketServices        ------------                            
  316. ; typedef struct AddSocketServicesPB  AddSocketServicesPB
  317. AddSocketServicesPB     RECORD    0
  318. ssEntry                     ds.l   1        ; offset: $0 (0)        ; -> given to CS for its use
  319. csEntry                     ds.l   1        ; offset: $4 (4)        ; <- taken from CS so we know where to enter
  320. dataPtr                     ds.l   1        ; offset: $8 (8)
  321. attributes                 ds.l   1        ; offset: $C (12)
  322. numAdapters                 ds.w   1        ; offset: $10 (16)
  323. numSockets                 ds.w   1        ; offset: $12 (18)
  324. sizeof                     EQU *            ; size:   $14 (20)
  325.                         ENDR
  326.  
  327. ;------------         ReplaceSocketServices    ------------                            
  328. ; typedef struct ReplaceSocketServicesPB  ReplaceSocketServicesPB
  329. ReplaceSocketServicesPB RECORD    0
  330. ssEntry                     ds.l   1        ; offset: $0 (0)
  331. oldSSEntry                 ds.l   1        ; offset: $4 (4)
  332. dataPtr                     ds.l   1        ; offset: $8 (8)
  333. socket                     ds.w   1        ; offset: $C (12)
  334. numSockets                 ds.w   1        ; offset: $E (14)
  335. attributes                 ds.w   1        ; offset: $10 (16)
  336. sizeof                     EQU *            ; size:   $12 (18)
  337.                         ENDR
  338.  
  339. ;
  340. ; pascal OSErr CSAddSocketServices(AddSocketServicesPB *pb)
  341. ;
  342.     IF ¬ GENERATINGCFM THEN
  343.         Macro
  344.         _CSAddSocketServices
  345.             moveq    #80,d0
  346.             dc.w     $AAF0
  347.         EndM
  348.     ELSE
  349.         IMPORT_CFM_FUNCTION    CSAddSocketServices
  350.     ENDIF
  351.  
  352. ;
  353. ; pascal OSErr CSReplaceSocketServices(ReplaceSocketServicesPB *pb)
  354. ;
  355.     IF ¬ GENERATINGCFM THEN
  356.         Macro
  357.         _CSReplaceSocketServices
  358.             moveq    #81,d0
  359.             dc.w     $AAF0
  360.         EndM
  361.     ELSE
  362.         IMPORT_CFM_FUNCTION    CSReplaceSocketServices
  363.     ENDIF
  364.  
  365. ;————————————————————————————————————————————————————————————————————————
  366. ;    parameter blocks for each Socket Service function
  367. ;————————————————————————————————————————————————————————————————————————
  368. ; typedef struct SSAcknowledgeInterruptPB  SSAcknowledgeInterruptPB
  369. SSAcknowledgeInterruptPB RECORD    0
  370. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  371. sockets                     ds.w   1        ; offset: $2 (2)        ;    SS_SKTBITS
  372. sizeof                     EQU *            ; size:   $4 (4)
  373.                         ENDR
  374.  
  375. ; typedef struct SSGetAccessOffsetsPB  SSGetAccessOffsetsPB
  376. SSGetAccessOffsetsPB     RECORD    0
  377. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  378. mode                     ds.b   1        ; offset: $2 (2)        ;    SS_BYTE
  379. reserved                 ds.b   1        ; offset: $3 (3)        ;    padding
  380. count                     ds.w   1        ; offset: $4 (4)        ;    SS_COUNT
  381. buffer                     ds.l   1        ; offset: $6 (6)        ;    SS_PTR
  382. numAvail                 ds.w   1        ; offset: $A (10)        ;    SS_COUNT
  383. sizeof                     EQU *            ; size:   $C (12)
  384.                         ENDR
  385.  
  386. ; typedef struct SSGetAdapterCountPB  SSGetAdapterCountPB
  387. SSGetAdapterCountPB     RECORD    0
  388. totalAdapters             ds.w   1        ; offset: $0 (0)        ;    SS_COUNT
  389. sig                         ds.w   1        ; offset: $2 (2)        ;    SS_SIGNATURE
  390. sizeof                     EQU *            ; size:   $4 (4)
  391.                         ENDR
  392.  
  393. ; typedef struct SSGetSetAdapterPB  SSGetSetAdapterPB
  394. SSGetSetAdapterPB         RECORD    0
  395. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  396. state                     ds.b   1        ; offset: $2 (2)        ;    SS_FLAGS8
  397. irqStatus                 ds.b   1        ; offset: $3 (3)        ;    SS_IRQ
  398. sizeof                     EQU *            ; size:   $4 (4)
  399.                         ENDR
  400.  
  401. ; typedef struct SSGetSetEDCPB  SSGetSetEDCPB
  402. SSGetSetEDCPB             RECORD    0
  403. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  404. edc                         ds.w   1        ; offset: $2 (2)        ;    SS_EDC
  405. socket                     ds.w   1        ; offset: $4 (4)        ;    SS_SOCKET
  406. state                     ds.b   1        ; offset: $6 (6)        ;    SS_FLAGS8
  407. edcType                     ds.b   1        ; offset: $7 (7)        ;    SS_FLAGS8
  408. sizeof                     EQU *            ; size:   $8 (8)
  409.                         ENDR
  410.  
  411. ; typedef struct SSGetSetPagePB  SSGetSetPagePB
  412. SSGetSetPagePB             RECORD    0
  413. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  414. window                     ds.w   1        ; offset: $2 (2)        ;    SS_WINDOW
  415. page                     ds.w   1        ; offset: $4 (4)        ;    SS_PAGE
  416. state                     ds.b   1        ; offset: $6 (6)        ;    SS_FLAGS8
  417. reserved                 ds.b   1        ; offset: $7 (7)        ;    padding
  418. offset                     ds.l   1        ; offset: $8 (8)        ;    SS_OFFSET
  419. sizeof                     EQU *            ; size:   $C (12)
  420.                         ENDR
  421.  
  422. ; typedef struct SSGetSetPriorHandlerPB  SSGetSetPriorHandlerPB
  423. SSGetSetPriorHandlerPB     RECORD    0
  424. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  425. mode                     ds.b   1        ; offset: $2 (2)        ;    SS_FLAGS8
  426. reserved                 ds.b   1        ; offset: $3 (3)        ;    padding
  427. handler                     ds.l   1        ; offset: $4 (4)        ;    SS_PTR
  428. sizeof                     EQU *            ; size:   $8 (8)
  429.                         ENDR
  430.  
  431. ; typedef struct SSGetSetSocketPB  SSGetSetSocketPB
  432. SSGetSetSocketPB         RECORD    0
  433. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  434. socket                     ds.w   1        ; offset: $2 (2)        ;    SS_SOCKET
  435. vccIndex                 ds.w   1        ; offset: $4 (4)        ;    SS_PWRINDEX
  436. vpp1Index                 ds.w   1        ; offset: $6 (6)        ;    SS_PWRINDEX
  437. vpp2Index                 ds.w   1        ; offset: $8 (8)        ;    SS_PWRINDEX
  438. scIntMask                 ds.b   1        ; offset: $A (10)        ;    SS_FLAGS8
  439. state                     ds.b   1        ; offset: $B (11)        ;    SS_FLAGS8
  440. ctlInd                     ds.b   1        ; offset: $C (12)        ;    SS_FLAGS8
  441. ireqRouting                 ds.b   1        ; offset: $D (13)        ;    SS_IRQ
  442. ifType                     ds.b   1        ; offset: $E (14)        ;    SS_FLAGS8
  443. padding                     ds.b   1        ; offset: $F (15)        ;    
  444. sizeof                     EQU *            ; size:   $10 (16)
  445.                         ENDR
  446.  
  447. ; typedef struct SSGetSetSSAddrPB  SSGetSetSSAddrPB
  448. SSGetSetSSAddrPB         RECORD    0
  449. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  450. mode                     ds.b   1        ; offset: $2 (2)        ;    SS_BYTE
  451. subfunc                     ds.b   1        ; offset: $3 (3)        ;    SS_BYTE
  452. numAddData                 ds.w   1        ; offset: $4 (4)        ;    SS_COUNT
  453. buffer                     ds.l   1        ; offset: $6 (6)        ;    SS_PTR
  454. sizeof                     EQU *            ; size:   $A (10)
  455.                         ENDR
  456.  
  457. ; typedef struct SSGetSetWindowPB  SSGetSetWindowPB
  458. SSGetSetWindowPB         RECORD    0
  459. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  460. window                     ds.w   1        ; offset: $2 (2)        ;    SS_WINDOW
  461. socket                     ds.w   1        ; offset: $4 (4)        ;    SS_SOCKET
  462. size                     ds.l   1        ; offset: $6 (6)        ;    SS_SIZE
  463. state                     ds.b   1        ; offset: $A (10)        ;    SS_FLAGS8
  464. reserved                 ds.b   1        ; offset: $B (11)        ;    padding
  465. speed                     ds.w   1        ; offset: $C (12)        ;    SS_SPEED
  466. base                     ds.l   1        ; offset: $E (14)        ;    SS_BASE
  467. sizeof                     EQU *            ; size:   $12 (18)
  468.                         ENDR
  469.  
  470. ; typedef struct SSGetSSInfoPB  SSGetSSInfoPB
  471. SSGetSSInfoPB             RECORD    0
  472. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  473. compliance                 ds.w   1        ; offset: $2 (2)        ;    SS_BCD
  474. numAdapters                 ds.w   1        ; offset: $4 (4)        ;    SS_COUNT
  475. firstAdapter             ds.w   1        ; offset: $6 (6)        ;    SS_ADAPTER
  476. sizeof                     EQU *            ; size:   $8 (8)
  477.                         ENDR
  478.  
  479. ; typedef struct SSGetStatusPB  SSGetStatusPB
  480. SSGetStatusPB             RECORD    0
  481. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  482. socket                     ds.w   1        ; offset: $2 (2)        ;    SS_SOCKET
  483. cardState                 ds.b   1        ; offset: $4 (4)        ;    SS_FLAGS8
  484. socketState                 ds.b   1        ; offset: $5 (5)        ;    SS_FLAGS8
  485. ctlInd                     ds.b   1        ; offset: $6 (6)        ;    SS_FLAGS8
  486. ireqRouting                 ds.b   1        ; offset: $7 (7)        ;    SS_IRQ
  487. ifType                     ds.b   1        ; offset: $8 (8)        ;    SS_FLAGS8
  488. padding                     ds.b   1        ; offset: $9 (9)        ;    
  489. sizeof                     EQU *            ; size:   $A (10)
  490.                         ENDR
  491.  
  492. ; typedef struct SSGetVendorInfoPB  SSGetVendorInfoPB
  493. SSGetVendorInfoPB         RECORD    0
  494. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  495. vendorInfoType             ds.b   1        ; offset: $2 (2)        ;    SS_BYTE
  496. reserved                 ds.b   1        ; offset: $3 (3)        ;    padding
  497. buffer                     ds.l   1        ; offset: $4 (4)        ;    SS_PTR
  498. release                     ds.w   1        ; offset: $8 (8)        ;    SS_BCD
  499. sizeof                     EQU *            ; size:   $A (10)
  500.                         ENDR
  501.  
  502. ; typedef struct SSInquireAdapterPB  SSInquireAdapterPB
  503. SSInquireAdapterPB         RECORD    0
  504. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  505. buffer                     ds.l   1        ; offset: $2 (2)        ;    SS_PTR
  506. numSockets                 ds.w   1        ; offset: $6 (6)        ;    SS_COUNT
  507. numWindows                 ds.w   1        ; offset: $8 (8)        ;    SS_COUNT
  508. numEDCs                     ds.w   1        ; offset: $A (10)        ;    SS_COUNT
  509. sizeof                     EQU *            ; size:   $C (12)
  510.                         ENDR
  511.  
  512. ; typedef struct SSInquireEDCPB  SSInquireEDCPB
  513. SSInquireEDCPB             RECORD    0
  514. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  515. edc                         ds.w   1        ; offset: $2 (2)        ;    SS_EDC
  516. sockets                     ds.w   1        ; offset: $4 (4)        ;    SS_SKTBITS
  517. caps                     ds.b   1        ; offset: $6 (6)        ;    SS_FLAGS8
  518. types                     ds.b   1        ; offset: $7 (7)        ;    SS_FLAGS8
  519. sizeof                     EQU *            ; size:   $8 (8)
  520.                         ENDR
  521.  
  522. ; typedef struct SSInquireSocketPB  SSInquireSocketPB
  523. SSInquireSocketPB         RECORD    0
  524. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  525. socket                     ds.w   1        ; offset: $2 (2)        ;    SS_SOCKET
  526. buffer                     ds.l   1        ; offset: $4 (4)        ;    SS_PTR
  527. scIntCaps                 ds.b   1        ; offset: $8 (8)        ;    SS_FLAGS8
  528. scRptCaps                 ds.b   1        ; offset: $9 (9)        ;    SS_FLAGS8
  529. ctlIndCaps                 ds.b   1        ; offset: $A (10)        ;    SS_FLAGS8
  530. padding                     ds.b   1        ; offset: $B (11)        ;    
  531. sizeof                     EQU *            ; size:   $C (12)
  532.                         ENDR
  533.  
  534. ; typedef struct SSInquireWindowPB  SSInquireWindowPB
  535. SSInquireWindowPB         RECORD    0
  536. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  537. window                     ds.w   1        ; offset: $2 (2)        ;    SS_WINDOW
  538. buffer                     ds.l   1        ; offset: $4 (4)        ;    SS_PTR
  539. wndCaps                     ds.b   1        ; offset: $8 (8)        ;    SS_FLAGS8
  540. reserved                 ds.b   1        ; offset: $9 (9)        ;    padding
  541. sockets                     ds.w   1        ; offset: $A (10)        ;    SS_SKTBITS
  542. sizeof                     EQU *            ; size:   $C (12)
  543.                         ENDR
  544.  
  545. ; typedef struct SSPauseEDCPB  SSPauseEDCPB
  546. SSPauseEDCPB             RECORD    0
  547. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  548. edc                         ds.w   1        ; offset: $2 (2)        ;    SS_EDC
  549. sizeof                     EQU *            ; size:   $4 (4)
  550.                         ENDR
  551.  
  552. ; typedef struct SSReadEDCPB  SSReadEDCPB
  553. SSReadEDCPB             RECORD    0
  554. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  555. edc                         ds.w   1        ; offset: $2 (2)        ;    SS_EDC
  556. value                     ds.w   1        ; offset: $4 (4)        ;    SS_WORD
  557. sizeof                     EQU *            ; size:   $6 (6)
  558.                         ENDR
  559.  
  560. ; typedef struct SSResetSocketPB  SSResetSocketPB
  561. SSResetSocketPB         RECORD    0
  562. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  563. socket                     ds.w   1        ; offset: $2 (2)        ;    SS_SOCKET
  564. sizeof                     EQU *            ; size:   $4 (4)
  565.                         ENDR
  566.  
  567. ; typedef struct SSResumeEDCPB  SSResumeEDCPB
  568. SSResumeEDCPB             RECORD    0
  569. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  570. edc                         ds.w   1        ; offset: $2 (2)        ;    SS_EDC
  571. sizeof                     EQU *            ; size:   $4 (4)
  572.                         ENDR
  573.  
  574. ; typedef struct SSStartEDCPB  SSStartEDCPB
  575. SSStartEDCPB             RECORD    0
  576. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  577. edc                         ds.w   1        ; offset: $2 (2)        ;    SS_EDC
  578. sizeof                     EQU *            ; size:   $4 (4)
  579.                         ENDR
  580.  
  581. ; typedef struct SSStopEDCPB  SSStopEDCPB
  582. SSStopEDCPB             RECORD    0
  583. adapter                     ds.w   1        ; offset: $0 (0)        ;    SS_ADAPTER
  584. edc                         ds.w   1        ; offset: $2 (2)        ;    SS_EDC
  585. sizeof                     EQU *            ; size:   $4 (4)
  586.                         ENDR
  587.  
  588. ; typedef struct SSVendorSpecificPB  SSVendorSpecificPB
  589. SSVendorSpecificPB         RECORD    0
  590. vsFunction                 ds.w   1        ; offset: $0 (0)        ;    SS_WORD
  591. adapter                     ds.w   1        ; offset: $2 (2)        ;    SS_ADAPTER
  592. socket                     ds.w   1        ; offset: $4 (4)        ;    SS_SOCKET
  593. bufferSize                 ds.w   1        ; offset: $6 (6)        ;    SS_WORD
  594. buffer                     ds.l   1        ; offset: $8 (8)        ;    SS_PTR
  595. attributes                 ds.l   1        ; offset: $C (12)        ;    SS_LONG
  596. sizeof                     EQU *            ; size:   $10 (16)
  597.                         ENDR
  598.  
  599. ;    ‘attributes’ constants 
  600.  
  601. kSSGoingToSleep                    EQU        $00000001
  602. kSSWakingFromSleep                EQU        $00000002
  603.  
  604. ;————————————————————————————————————————————————————————————————————————
  605. ;    Non-specific Socket Services Functions
  606. ;————————————————————————————————————————————————————————————————————————
  607. ;
  608. ; pascal SS_RETCODE SSGetAdapterCount(SSGetAdapterCountPB *pb, Ptr dataPtr)
  609. ;
  610.     IF GENERATINGCFM THEN
  611.         IMPORT_CFM_FUNCTION    SSGetAdapterCount
  612.     ENDIF
  613.  
  614. ;————————————————————————————————————————————————————————————————————————
  615. ;    Adapter Functions
  616. ;————————————————————————————————————————————————————————————————————————
  617. ;
  618. ; pascal SS_RETCODE SSAcknowledgeInterrupt(SSAcknowledgeInterruptPB *pb, Ptr dataPtr)
  619. ;
  620.     IF GENERATINGCFM THEN
  621.         IMPORT_CFM_FUNCTION    SSAcknowledgeInterrupt
  622.     ENDIF
  623.  
  624. ;
  625. ; pascal SS_RETCODE SSGetSetPriorHandler(SSGetSetPriorHandlerPB *pb, Ptr dataPtr)
  626. ;
  627.     IF GENERATINGCFM THEN
  628.         IMPORT_CFM_FUNCTION    SSGetSetPriorHandler
  629.     ENDIF
  630.  
  631. ;
  632. ; pascal SS_RETCODE SSGetSetSSAddr(SSGetSetSSAddrPB *pb, Ptr dataPtr)
  633. ;
  634.     IF GENERATINGCFM THEN
  635.         IMPORT_CFM_FUNCTION    SSGetSetSSAddr
  636.     ENDIF
  637.  
  638. ;
  639. ; pascal SS_RETCODE SSGetAccessOffsets(SSGetAccessOffsetsPB *pb, Ptr dataPtr)
  640. ;
  641.     IF GENERATINGCFM THEN
  642.         IMPORT_CFM_FUNCTION    SSGetAccessOffsets
  643.     ENDIF
  644.  
  645. ;
  646. ; pascal SS_RETCODE SSGetAdapter(SSGetSetAdapterPB *pb, Ptr dataPtr)
  647. ;
  648.     IF GENERATINGCFM THEN
  649.         IMPORT_CFM_FUNCTION    SSGetAdapter
  650.     ENDIF
  651.  
  652. ;
  653. ; pascal SS_RETCODE SSGetSSInfo(SSGetSSInfoPB *pb, Ptr dataPtr)
  654. ;
  655.     IF GENERATINGCFM THEN
  656.         IMPORT_CFM_FUNCTION    SSGetSSInfo
  657.     ENDIF
  658.  
  659. ;
  660. ; pascal SS_RETCODE SSGetVendorInfo(SSGetVendorInfoPB *pb, Ptr dataPtr)
  661. ;
  662.     IF GENERATINGCFM THEN
  663.         IMPORT_CFM_FUNCTION    SSGetVendorInfo
  664.     ENDIF
  665.  
  666. ;
  667. ; pascal SS_RETCODE SSInquireAdapter(SSInquireAdapterPB *pb, Ptr dataPtr)
  668. ;
  669.     IF GENERATINGCFM THEN
  670.         IMPORT_CFM_FUNCTION    SSInquireAdapter
  671.     ENDIF
  672.  
  673. ;
  674. ; pascal SS_RETCODE SSSetAdapter(SSGetSetAdapterPB *pb, Ptr dataPtr)
  675. ;
  676.     IF GENERATINGCFM THEN
  677.         IMPORT_CFM_FUNCTION    SSSetAdapter
  678.     ENDIF
  679.  
  680. ;
  681. ; pascal SS_RETCODE SSVendorSpecific(SSVendorSpecificPB *pb, Ptr dataPtr)
  682. ;
  683.     IF GENERATINGCFM THEN
  684.         IMPORT_CFM_FUNCTION    SSVendorSpecific
  685.     ENDIF
  686.  
  687. ;————————————————————————————————————————————————————————————————————————
  688. ;    Socket Functions
  689. ;————————————————————————————————————————————————————————————————————————
  690. ;
  691. ; pascal SS_RETCODE SSGetSocket(SSGetSetSocketPB *pb, Ptr dataPtr)
  692. ;
  693.     IF GENERATINGCFM THEN
  694.         IMPORT_CFM_FUNCTION    SSGetSocket
  695.     ENDIF
  696.  
  697. ;
  698. ; pascal SS_RETCODE SSGetStatus(SSGetStatusPB *pb, Ptr dataPtr)
  699. ;
  700.     IF GENERATINGCFM THEN
  701.         IMPORT_CFM_FUNCTION    SSGetStatus
  702.     ENDIF
  703.  
  704. ;
  705. ; pascal SS_RETCODE SSInquireSocket(SSInquireSocketPB *pb, Ptr dataPtr)
  706. ;
  707.     IF GENERATINGCFM THEN
  708.         IMPORT_CFM_FUNCTION    SSInquireSocket
  709.     ENDIF
  710.  
  711. ;
  712. ; pascal SS_RETCODE SSResetSocket(SSResetSocketPB *pb, Ptr dataPtr)
  713. ;
  714.     IF GENERATINGCFM THEN
  715.         IMPORT_CFM_FUNCTION    SSResetSocket
  716.     ENDIF
  717.  
  718. ;
  719. ; pascal SS_RETCODE SSSetSocket(SSGetSetSocketPB *pb, Ptr dataPtr)
  720. ;
  721.     IF GENERATINGCFM THEN
  722.         IMPORT_CFM_FUNCTION    SSSetSocket
  723.     ENDIF
  724.  
  725. ;————————————————————————————————————————————————————————————————————————
  726. ;    Window Functions
  727. ;————————————————————————————————————————————————————————————————————————
  728. ;
  729. ; pascal SS_RETCODE SSGetPage(SSGetSetPagePB *pb, Ptr dataPtr)
  730. ;
  731.     IF GENERATINGCFM THEN
  732.         IMPORT_CFM_FUNCTION    SSGetPage
  733.     ENDIF
  734.  
  735. ;
  736. ; pascal SS_RETCODE SSGetWindow(SSGetSetWindowPB *pb, Ptr dataPtr)
  737. ;
  738.     IF GENERATINGCFM THEN
  739.         IMPORT_CFM_FUNCTION    SSGetWindow
  740.     ENDIF
  741.  
  742. ;
  743. ; pascal SS_RETCODE SSInquireWindow(SSInquireWindowPB *pb, Ptr dataPtr)
  744. ;
  745.     IF GENERATINGCFM THEN
  746.         IMPORT_CFM_FUNCTION    SSInquireWindow
  747.     ENDIF
  748.  
  749. ;
  750. ; pascal SS_RETCODE SSSetPage(SSGetSetPagePB *pb, Ptr dataPtr)
  751. ;
  752.     IF GENERATINGCFM THEN
  753.         IMPORT_CFM_FUNCTION    SSSetPage
  754.     ENDIF
  755.  
  756. ;
  757. ; pascal SS_RETCODE SSSetWindow(SSGetSetWindowPB *pb, Ptr dataPtr)
  758. ;
  759.     IF GENERATINGCFM THEN
  760.         IMPORT_CFM_FUNCTION    SSSetWindow
  761.     ENDIF
  762.  
  763. ;————————————————————————————————————————————————————————————————————————
  764. ;    Error Detection Functions
  765. ;————————————————————————————————————————————————————————————————————————
  766. ;
  767. ; pascal SS_RETCODE SSGetEDC(SSGetSetEDCPB *pb, Ptr dataPtr)
  768. ;
  769.     IF GENERATINGCFM THEN
  770.         IMPORT_CFM_FUNCTION    SSGetEDC
  771.     ENDIF
  772.  
  773. ;
  774. ; pascal SS_RETCODE SSInquireEDC(SSInquireEDCPB *pb, Ptr dataPtr)
  775. ;
  776.     IF GENERATINGCFM THEN
  777.         IMPORT_CFM_FUNCTION    SSInquireEDC
  778.     ENDIF
  779.  
  780. ;
  781. ; pascal SS_RETCODE SSPauseEDC(SSPauseEDCPB *pb, Ptr dataPtr)
  782. ;
  783.     IF GENERATINGCFM THEN
  784.         IMPORT_CFM_FUNCTION    SSPauseEDC
  785.     ENDIF
  786.  
  787. ;
  788. ; pascal SS_RETCODE SSReadEDC(SSReadEDCPB *pb, Ptr dataPtr)
  789. ;
  790.     IF GENERATINGCFM THEN
  791.         IMPORT_CFM_FUNCTION    SSReadEDC
  792.     ENDIF
  793.  
  794. ;
  795. ; pascal SS_RETCODE SSResumeEDC(SSResumeEDCPB *pb, Ptr dataPtr)
  796. ;
  797.     IF GENERATINGCFM THEN
  798.         IMPORT_CFM_FUNCTION    SSResumeEDC
  799.     ENDIF
  800.  
  801. ;
  802. ; pascal SS_RETCODE SSSetEDC(SSGetSetEDCPB *pb, Ptr dataPtr)
  803. ;
  804.     IF GENERATINGCFM THEN
  805.         IMPORT_CFM_FUNCTION    SSSetEDC
  806.     ENDIF
  807.  
  808. ;
  809. ; pascal SS_RETCODE SSStartEDC(SSStartEDCPB *pb, Ptr dataPtr)
  810. ;
  811.     IF GENERATINGCFM THEN
  812.         IMPORT_CFM_FUNCTION    SSStartEDC
  813.     ENDIF
  814.  
  815. ;
  816. ; pascal SS_RETCODE SSStopEDC(SSStopEDCPB *pb, Ptr dataPtr)
  817. ;
  818.     IF GENERATINGCFM THEN
  819.         IMPORT_CFM_FUNCTION    SSStopEDC
  820.     ENDIF
  821.  
  822.     ENDIF ; __SOCKETSERVICES__
  823.